package com.tbit.uqbike.client.pojo;

import com.tbit.uqbike.client.constant.MachineStateConstant;

/**
 * 设备
 *
 * @author Leon
 * 2017年4月26日 下午1:47:49
 */
public class Machine {
    /**
     * 设备id
     */
    private Integer machineId;
    /**
     * 账号id
     */
    private Integer accountId;
    /**
     * 设备编号
     */
    private String machineNO;
    /**
     * 用户码
     */
    private String userCode;
    /**
     * 设备类型
     * 0-电单车
     * 1-单车(自行车)
     */
    private Integer machineType;
    /**
     * imei号
     */
    private String imei;
    /**
     * imsi
     */
    private String imsi;
    /**
     * sim卡号
     */
    private String simNO;
    /**
     * 版本号
     */
    private String version;
    /**
     * 添加时间
     */
    private String joinTime;
    /**
     * 服务时间
     */
    private String serviceTime;
    /**
     * 车辆状态 1:待投放 2:待调度 3:正常运营 4:故障 5:报废
     */
    private Integer state;
    /**
     * 最后借出用户id
     */
    private Integer lastUserId;
    /**
     * 最后借出时间
     */
    private String lastBorrowTime;

    private Integer parkState;

    private String license;

    public String getLicense() {
        return license;
    }

    public void setLicense(String license) {
        this.license = license;
    }

    public Integer getMachineGroupId() {
        return machineGroupId;
    }

    public void setMachineGroupId(Integer machineGroupId) {
        this.machineGroupId = machineGroupId;
    }

    /**
     * 车辆分组Id
     */
    private Integer machineGroupId;

    public Integer getMachineId() {
        return machineId;
    }

    public void setMachineId(Integer machineId) {
        this.machineId = machineId;
    }

    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public String getMachineNO() {
        return machineNO;
    }

    public void setMachineNO(String machineNO) {
        this.machineNO = machineNO;
    }

    public Integer getMachineType() {
        return machineType;
    }

    public void setMachineType(Integer machineType) {
        this.machineType = machineType;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public String getImsi() {
        return imsi;
    }

    public void setImsi(String imsi) {
        this.imsi = imsi;
    }

    public String getSimNO() {
        return simNO;
    }

    public void setSimNO(String simNO) {
        this.simNO = simNO;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(String joinTime) {
        this.joinTime = joinTime;
    }

    public String getServiceTime() {
        return serviceTime;
    }

    public void setServiceTime(String serviceTime) {
        this.serviceTime = serviceTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getLastUserId() {
        return lastUserId;
    }

    public void setLastUserId(Integer lastUserId) {
        this.lastUserId = lastUserId;
    }

    public String getLastBorrowTime() {
        return lastBorrowTime;
    }

    public void setLastBorrowTime(String lastBorrowTime) {
        this.lastBorrowTime = lastBorrowTime;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public Integer getParkState() {
        return parkState;
    }

    public void setParkState(Integer parkState) {
        this.parkState = parkState;
    }

    @Override
    public String toString() {
        return "Machine [machineId=" + machineId + ", accountId=" + accountId + ", machineNO=" + machineNO + ", imei=" + imei + ", imsi=" + imsi + ", simNO=" + simNO + ", version=" + version + ", joinTime=" + joinTime + ", serviceTime=" + serviceTime
                + ", state=" + state + ", lastUserId=" + lastUserId + ", lastBorrowTime=" + lastBorrowTime + "]";
    }

    public boolean machineTypeIsBicycle() {
        return MachineStateConstant.MACHINE_TYPE_BIKE.equals(this.machineType);
    }

}
